{include file="common/head"}
<head>
<title>用户协议</title>
<link    rel="stylesheet"    href="https://cdnjs.cloudflare.com/ajax/libs/jodit/3.24.2/jodit.es2018.min.css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jodit/3.24.2/jodit.es2018.min.js"></script>    

<style>
  .box{border: 0px solid #ccc;text-align: left;max-width: 800px;padding:10px 20px;}
</style>
</head>
<body style="">
    <div class=" p-3 my-3 " style="max-width: 800px;"  >
   <h2>
    用户协议
    <a href="/admin/sys"><button class="btn btn-primary">系统设置</button></a>  
  </h2>

    <h2></h2>
    <form method="post" action="/index.php/index/agreement" enctype="multipart/form-data">
      <input type="hidden" name="id" value="{$data.id}" />

      <div class="mb-3 agreement">
        <label for="agreement" class="form-label">协议内容：</label>
        <textarea class="form-control" id="agreement" name="agreement" placeholder="内容"  >{$data.agreement}</textarea>
      </div>
   
      <button  type="button" class="btn btn-primary" onclick="doSave()">保存</button>

    </form>
    </div>


<script type="text/javascript">

    var editor = Jodit.make('#agreement',{
      toolbarButtonSize: 'small',
      //textIcons: true
    });


    //editor.value = ''; 

    function doSave(){
      if( !$("#agreement").val()) {
        layer.msg("无效的协议内容!");
        return 0;
      }    
      $('form').submit();
    }


    $(function(){

    })

</script>


</body>
</html>
